package com.dubbo.protocol;

import com.dubbo.protocol.http.HttpServer;
import com.dubbo.protocol.netty.NettyRpcServer;
import com.dubbo.protocol.socket.SocketServ;

public class ServerFactory
{
    public static final String HTTP = "http";
    public static final String SOCKET = "socket";
    public static final String NETTY = "netty";

    public static Server get(String protocol)
    {
        if(HTTP.equals(protocol))
        {
            return new HttpServer();
        }
        if(NETTY.equals(protocol))
        {
            return new NettyRpcServer();
        }
        return new SocketServ();
    }
}
